package com.wangp.qms.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wangp.qms.common.CommonResponse;
import com.wangp.qms.service.IBackendService;

@Controller
public class BackendController {

	@Autowired
	private IBackendService iBackendService;

	// 测试
	@RequestMapping("/totest")
	@ResponseBody
	public CommonResponse toTest() {
		return CommonResponse.creatResponse(1, " 测试结果");
	}

	// 工作台
	@RequestMapping("/towork")
	public String workend() {
		return "backend";
	}

	@ResponseBody
	@RequestMapping("/viptoservice")
	public CommonResponse serviceVip() {
		String result = iBackendService.vipBackendService();
		return CommonResponse.creatResponse(1, result);
	}

	@ResponseBody
	@RequestMapping("/priortoservice")
	public CommonResponse servicePrior() {
		String result = iBackendService.priorBackendService();
		return CommonResponse.creatResponse(1, result);
	}

	@ResponseBody
	@RequestMapping("/generaltoservice")
	public CommonResponse serviceGeneral() {
		String result = iBackendService.generalBackendService();
		return CommonResponse.creatResponse(1, result);
	}

}